package org.cargloss.cp.controller.modul.feedback;

import org.cargloss.cp.model.FeedBack;

import util.hibernate.DAO;

import com.opensymphony.xwork2.ActionSupport;

public class ActionCrud extends ActionSupport {

	private static final long serialVersionUID = -5933849517817526086L;

	private int id;

	private String name;
	private String email;
	private String website;

	public String insert() {
		DAO<Integer> dao = new DAO<Integer>();
		FeedBack object = new FeedBack();
		object.setName(getName());
		object.setEmail(getEmail());
		object.setWebsite(getWebsite());
		dao.insert(object);
		dao.close();
		return SUCCESS;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

}
